package com.powernode.mapper;

import com.powernode.domain.User;import com.powernode.dto.UserDto;import org.apache.ibatis.annotations.Param;import org.apache.ibatis.annotations.Select;import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //登录用的
    @Select("select * from user where username=#{param1} and password=#{param2};")
    User select(String username, String password);

    //全查询用户
    List<User> queryAllUser(@Param("userDto") UserDto userDto);
    /**
     * 查询所有在职的业务员
     * @return
     */
    List<User> queryAllvailableUser();
}